<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<%@ taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>

<!-- 月历 -->
<script type="text/javascript" charset="UTF-8" src="/js/jquery.datepick.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.datepick-zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="/css/smoothness.datepick.css" />

<script>
	$().ready( function() {
		$('#expectedOnlineDateStParam').datepick({minDate: null, showOn:'both',numberOfMonths:1, buttonImageOnly: true, buttonImage: '/images/calendar.gif',dateFormat:"yy-mm-dd"});
		$('#expectedOnlineDateEdParam').datepick({minDate: null, showOn:'both',numberOfMonths:1, buttonImageOnly: true, buttonImage: '/images/calendar.gif',dateFormat:"yy-mm-dd"});
	});
	
	function openLink(pageLink) {
		window.open(pageLink+"?uid="+(new Date()).getTime());
	}
</script>
<s:actionerror />
<s:actionmessage />
<s:fielderror />			
	<div class="product">
		<div class="f-link"><a href="createPage.do">新增</a></div>
		<br>
		<h1>活动页面管理</h1>
		<s:form action="page/search.do" method="post">
			<p class="txt-L"><strong><span class="txt-rd">＊</span> 活动页名称：</strong><s:textfield name="titleParam" size="70"/></p>
			<p class="txt-L"><strong>活动上线日：</strong><s:textfield name="expectedOnlineDateStParam" id="expectedOnlineDateStParam" size="10" maxlength="10"/> ~
				<s:textfield name="expectedOnlineDateEdParam" id="expectedOnlineDateEdParam" size="10" maxlength="10"/>
			</p>
			<div class="l-link" style="text-align:right"><a href="#" onclick="document.forms[0].submit();">搜索</a></div>
		</s:form>
		<h2>活动页面列表</h2>
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb-05">
			<tbody>
			<tr>
				<th width="30">#</th>
				<th width="200"><strong>活动页面名称</strong></th>
				<th width="200"><strong>页面生成位置</strong></th>
				<th width="120"><strong>最后更新时间</strong></th>
				<th width="80"><strong>创建人员</strong></th>
				<th width="150"><strong>操作</strong></th>
	        </tr>
	        <s:iterator value="pageList" var="page" status="stat">
				<tr class="${(stat.index+1) % 2 == 0 ? 'bg-yl' : ''}">
					<td align="center">${stat.index+1 + pager.currentPage*20}</td>
					<td>${page.title}</td>
					<td><a href="javascript:openLink('${page.pageLocation}');" >${page.pageLocation}</a></td>
					<td align="center">${page.modifyDate}</td>
					<td align="center">${page.createUser}</td>
					<td align="left"><nobr>
						<a href="editPage.do?activityPage.id=${page.id}" class="a-modify">编辑</a>
						<yaodian100:checkPermission permissions="ROLE_ACTIVITY_MANAGER">
						<c:if test="${page.complete}">
							|
							<a href="../pageout/editPageOutput.do?activityPage.id=${page.id}" class="a-success" id="generateButton">
								生成上传
							</a>
						</c:if>
						</yaodian100:checkPermission>
					</nobr></td>
				</tr>
	        </s:iterator>
			</tbody>
		</table>
		<yaodian100:pageutil link="search.do" pagerObj="${pager}" />
	</div>



		
